package com.chushouya.order.dto.api.partnernotify;

import com.alibaba.fastjson.annotation.JSONField;
import com.general.framework.core.lang.Dates;
import com.chushouya.order.constants.PartnerNotifyTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel("订单销售成功")
public class SaleNotifyDTO extends PartnerBaseNotify{
    public SaleNotifyDTO(){
        super.setNotifyType(PartnerNotifyTypeEnum.SALE.value());
        super.setNotifyName(PartnerNotifyTypeEnum.SALE.named());
    }

    /**
     * 订单数据
     */
    private SaleNotifyData data;

    @Data
    @ApiModel("订单销售数据")
    public static class SaleNotifyData{

        /**
         * 订单状态
         */
        @ApiModelProperty("订单状态")
        private Integer orderStatus;

        /**
         * 质检价格
         */
        @ApiModelProperty("销售价格")
        private BigDecimal salePrice;

        /**
         * 质检时间
         */
        @ApiModelProperty("销售时间")
        @JSONField(format= Dates.FMT_FULL_TIME)
        private Date saleTime;

        /**
         * 质检备注
         */
        @ApiModelProperty("说明")
        private String remark;
    }
}
